package P1500;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author: zhouyang
 * @descrpition:
 * @time: 2019-10-11 16:50
 */
public class P1579_哥德巴赫猜想 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();//奇数
        scanner.close();
        boolean[] primes = new boolean[n + 1];
        List<Integer> list = new ArrayList<>();
        for (int i = 2; i <= n; ++i) {
            if (!primes[i]) {
                list.add(i);
            } else {
                continue;
            }
            int j = 2;
            while (true) {
                int now = j * i;
                if (now > n) break;
                primes[now] = true;
                ++j;
            }
        }
        invoke(n, list);
    }

    private static void invoke(int n, List<Integer> list) {
        for (int i = 0; i < list.size(); ++i) {
            for (int j = i; j >= i; ++j) {
                int find = n - list.get(i) - list.get(j);
                if (find < list.get(j)) break;
                for (int k = list.size() - 1; k >= j; --k) {
                    if (list.get(k) < find) break;
                    if (list.get(k) == find) {
                        System.out.printf("%d %d %d\n", list.get(i), list.get(j), list.get(k));
                        return;
                    }
                }
            }
        }
    }
}
